<template>
  <div class="hello">
    <h1>您好用户： {{ user.userName }} </h1>
    <h1>您的角色： {{ user.roleName }} </h1>
  </div>
</template>

<script>
  export default {
    name: 'left',
    data() {
      return {
      user: {
            userName:'',
            roleName:''
        },
      user: {
            userName:'',
            roleName:''
        }
      }
    },
    created(){
      this.users = JSON.parse(localStorage.getItem('token_key'));
      this.user.userName=this.users.userName;
      this.user.roleName=this.users.type;
    }
  }
</script>